var ProCountForm = function () {
  var template = /*html*/ `
    <div class="pro-count-form">
      <el-form :model="order" label-width="130px">
        <el-form-item label="仓库库存块料数量">
          <span>{{proStock.totalCount}}</span>
        </el-form-item>
        <el-form-item label="开料尺寸" class="sizeForm">
          <div v-for="(detail,index) in proStock.detailList" :key="'detail_'+index">{{detail.size}}</div>
        </el-form-item>
        <el-form-item label="本订单开料尺寸">
          <span>{{proStock.orderSize}}</span>
        </el-form-item>
        <el-form-item label="投料数">
          <el-input-number v-model="feedCount" controls-position="right" :precision="2" :step="0.1" :min="0" :max="proStock.totalCount">
          </el-input-number>
        </el-form-item>
      </el-form>
      <div style="text-align:center">
        <el-button type="primary" @click="ensure">确定</el-button>
      </div>
    </div>
  `;

  return {
    props: {
      proOrder: {
        type: Object,
        required: true
      },
      proStock: {
        type: Object,
        required: true
      }
    },
    data: function () {
      return {
        order: {},
        feedCount: this.proOrder.productionUnitFeedCount
      };
    },
    methods: {
      ensure: function () {
        var feedCount = this.feedCount;
        this.proOrder.productionUnitFeedCount = feedCount;
        this.$emit('update', feedCount);
      }
    },
    template: template
  };
}()